package com.bite.blog.mapper;

import com.bite.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {  //数据库操作

    @Select("select * from user where delete_flag = 0 and user_name = #{userName}")  //查找不被删除的用户名信息
    UserInfo selectByName(String userName);  //根据用户名,查找用户信息


    @Select("select * from user where delete_flag = 0 and id = #{id}")
    UserInfo selectById(Integer id);  //根据ID,查询用户信息
}
